
package com.syu.loopcure.compensator.dto;

import lombok.Data;

import java.io.Serializable;
import java.lang.reflect.Method;

/**  
 * ClassName: CompensatorDTO <br/>   
 * date: 2020年8月11日 下午2:13:08 <br/>  
 *  
 * @author zhucun
 * @since JDK 1.8  
 */

@Data
public class CompensatorDTO implements Serializable {

	/**  
	 * 序列号  
	 * @since JDK 1.8  
	 */
	private static final long serialVersionUID = 682612358377074841L;
	
	/**
	 * 方法所在类
	 */
	private Class<?> callableClass;
	
	/**
	 * 方法
	 */
	private Method callableMethod;
	
	/**
	 * 方法入参值
	 */
	private Object[] paramValueObj;

	/**
	 * 方法同步/异步执行，使用了@Async注解实现异步处理，返回值为Future,异常处理return false
	 */
	private Boolean asyncFlag;

	public CompensatorDTO() {
		
	}
	
	public CompensatorDTO(Class<?> callableClass, Method callableMethod
			, Object[] paramValueObj, Boolean asyncFlag) {
		this.callableClass = callableClass;
		this.callableMethod = callableMethod;
		this.paramValueObj = paramValueObj;
		this.asyncFlag = asyncFlag;
	}
}
  
